<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Pcloud extends MY_Controller{
	function __construct(){
		parent::__construct();
	}

	public function index(){
		$chi=$this->ResourceDescModel->get_subject_top10('语文');
		$mat=$this->ResourceDescModel->get_subject_top10('数学');
		$eng=$this->ResourceDescModel->get_subject_top10('英语');
		$phy=$this->ResourceDescModel->get_subject_top10('物理');
		$che=$this->ResourceDescModel->get_subject_top10('化学');
		$bio=$this->ResourceDescModel->get_subject_top10('生物');
		$pol=$this->ResourceDescModel->get_subject_top10('政治');
		$his=$this->ResourceDescModel->get_subject_top10('历史');
		$geo=$this->ResourceDescModel->get_subject_top10('地理');
		
		$top=$this->ResourceDescModel->get_top10();
		$data=array(
			'chi'=>$chi,
			'mat'=>$mat,
			'eng'=>$eng,
			'phy'=>$phy,
			'che'=>$che,
			'bio'=>$bio,
			'pol'=>$pol,
			'his'=>$his,
			'geo'=>$geo,
			'top'=>$top
			);


		$this->load->view('publicCloud/publicCloud',$data);
	}

	// public function main(){

	// 	$all_res = $this->ResourceDescModel->get_all_public_res();

	// 	$this->load->view('publicCloud/header');
	// 	$this->load->view('publicCloud/index',array('all_res' => $all_res));//echo(json_encode($all_res));
	// 	$this->load->view('publicCloud/footer');
	// }
}